﻿@inherits ButtonBase
@inject IStringLocalizerAsync<SaveButton> Localizer
<AuthorizeView Policy="@SharedConstants.WRITERPOLICY">
    <Authorized>
        @if (Clicked.HasDelegate)
        {
            <button id="@Id" class="btn me-1 @CssSubClass" type="submit" @onclick="OnClicked">
                <span class="oi oi-data-transfer-download"></span>
                @Localizer["Save"]
            </button>
        }
        else
        {
            <button id="@Id" class="btn me-1 @CssSubClass" type="submit" disabled="@_disabled">
                <span class="oi oi-data-transfer-download"></span>
                @Localizer["Save"]
            </button>
        }
    </Authorized>
</AuthorizeView>